package a.f.l.a;

import a.d.t;
import a.d.w;

public class jb
{
  private static final double a = 1.0E-006D;
  private final eb b;
  private final double c;
  private final boolean e;
  public static boolean f;
  
  jb(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    if ((bool) || ((Math.abs(paramDouble2 - paramDouble4) < 1.0E-006D) && (Math.abs(paramDouble1 - paramDouble3) < 1.0E-006D))) {
      throw new IllegalStateException("Not able to calculate the orientation.");
    }
    if (!bool) {}
    this.e = (Math.abs(paramDouble1 - paramDouble3) < 1.0E-006D);
    this.b = (this.e ? new eb(paramDouble2, paramDouble4) : new eb(paramDouble1, paramDouble3));
    this.c = (this.e ? paramDouble1 : paramDouble2);
  }
  
  public jb(double paramDouble1, double paramDouble2, double paramDouble3, boolean paramBoolean)
  {
    this(new eb(paramDouble1, paramDouble2), paramDouble3, paramBoolean);
  }
  
  public jb(eb parameb, double paramDouble, boolean paramBoolean)
  {
    if (!sb.e)
    {
      if (parameb == null) {
        throw new IllegalArgumentException("range must not be null");
      }
      this.b = parameb;
      this.c = paramDouble;
      this.e = paramBoolean;
    }
  }
  
  public boolean a()
  {
    return this.e;
  }
  
  public double b()
  {
    return this.b.a();
  }
  
  public double c()
  {
    return this.b.b();
  }
  
  public double d()
  {
    return this.b.b() - this.b.a();
  }
  
  public eb e()
  {
    return this.b;
  }
  
  public double f()
  {
    return this.c;
  }
  
  public w g()
  {
    double d = this.b.c();
    return this.e ? new w(this.c, d) : new w(d, this.c);
  }
  
  public boolean a(jb paramjb)
  {
    boolean bool = sb.e;
    if (!bool) {
      if (this.e == paramjb.e) {
        throw new IllegalArgumentException("orthogonal intervals have same orientation");
      }
    }
    if ((bool) || (this.b.a(paramjb.c))) {
      if (bool) {}
    }
    return paramjb.b.a(this.c);
  }
  
  public double b(jb paramjb)
  {
    if (!sb.e) {
      if (this.e != paramjb.e) {
        throw new IllegalArgumentException("orthogonal intervals have different orientation");
      }
    }
    return e().b(paramjb.e());
  }
  
  public double c(jb paramjb)
  {
    if (!sb.e) {
      if (this.e != paramjb.e) {
        return e().b(paramjb.f()) + paramjb.e().b(f());
      }
    }
    return e().b(paramjb.e()) + Math.abs(f() - paramjb.f());
  }
  
  double d(jb paramjb)
  {
    if (!sb.e) {
      if (this.e != paramjb.e) {
        throw new IllegalArgumentException("orthogonal intervals have different orientation");
      }
    }
    return Math.abs(this.c - paramjb.c);
  }
  
  public boolean e(jb paramjb)
  {
    return a(paramjb, 0.0D);
  }
  
  public boolean a(jb paramjb, double paramDouble)
  {
    if (!sb.e) {
      if (this.e != paramjb.e) {
        throw new IllegalArgumentException("orthogonal intervals have different orientation");
      }
    }
    return this.b.a(paramjb.b, paramDouble);
  }
  
  public boolean f(jb paramjb)
  {
    if (!sb.e) {
      if (this.e != paramjb.e) {
        throw new IllegalArgumentException("orthogonal intervals have different orientation");
      }
    }
    return this.b.c(paramjb.b);
  }
  
  public boolean g(jb paramjb)
  {
    if (!sb.e) {
      if (this.e != paramjb.e) {
        throw new IllegalArgumentException("orthogonal intervals have different orientation");
      }
    }
    return this.b.f(paramjb.b);
  }
  
  public static jb a(jb paramjb1, jb paramjb2)
  {
    if (!sb.e) {
      if (paramjb1.e != paramjb2.e) {
        throw new IllegalArgumentException("orthogonal intervals have different orientation");
      }
    }
    eb localeb = eb.a(paramjb1.b, paramjb2.b);
    if (localeb != null) {
      return new jb(localeb.a(), localeb.b(), paramjb2.c, paramjb2.a());
    }
    return null;
  }
  
  public static jb b(jb paramjb1, jb paramjb2)
  {
    if (!sb.e) {
      if (paramjb1.e != paramjb2.e) {
        throw new IllegalArgumentException("orthogonal intervals have different orientation");
      }
    }
    eb localeb = eb.b(paramjb1.b, paramjb2.b);
    return new jb(localeb.a(), localeb.b(), paramjb2.c, paramjb2.a());
  }
  
  public String toString()
  {
    return "OrthogonalInterval{range=" + this.b + ", location=" + this.c + ", isVertical=" + this.e + '}';
  }
  
  private double h()
  {
    if (!sb.e) {}
    return this.e ? c() : this.c;
  }
  
  private double i()
  {
    if (!sb.e) {}
    return this.e ? this.c : c();
  }
  
  private double j()
  {
    if (!sb.e) {}
    return this.e ? b() : this.c;
  }
  
  private double k()
  {
    if (!sb.e) {}
    return this.e ? this.c : b();
  }
  
  static boolean a(t paramt, jb paramjb)
  {
    boolean bool = sb.e;
    double d1 = paramjb.k();
    double d2 = paramjb.j();
    double d3 = paramjb.i();
    double d4 = paramjb.h();
    if (!bool) {
      if (!paramt.a(d1, d2)) {
        if (bool) {
          break label60;
        }
      }
    }
    label60:
    return paramt.a(d3, d4);
  }
  
  static boolean c(t paramt, jb paramjb)
  {
    boolean bool = sb.e;
    double d1 = paramjb.k();
    double d2 = paramjb.j();
    double d3 = paramjb.i();
    double d4 = paramjb.h();
    if ((bool) || (paramt.a(d1, d2))) {
      if (bool) {}
    }
    return paramt.a(d3, d4);
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.f.l.a.jb
 * JD-Core Version:    0.7.0.1
 */